/**
 * Created by younger on 2016/04/19.
 */

//评论模块
define(['../ng'], function (ng) {
    ng.controller('assessCtrl', function ($scope) {
        $scope.assessList = [
            {
                "username": "梅长苏",
                "portrait": "img/photostream-1.jpg",
                "message": "好好",
                "time": "2016/4/20 20:31"
            },
            {
                "username": "景琰",
                "portrait": "img/photostream-1.jpg",
                "message": "好好好",
                "time": "2016/4/20 20:31"
            }
        ];

        //发表评论
        $scope.assessMessage = '';
        $scope.toAssess = function () {
            $scope.assessList.push({
                "name": "温石洋",
                "portrait": "img/photostream-1.jpg",
                "message": "好好",
                "time": new Date().toLocaleDateString() + ' ' + new Date().getUTCHours() + ':' + new Date().getMinutes()
            })
        }
    });
});